John Wayne never said "A man's gotta do what a man's gotta do" – not in a film, anyway. This was the closest he got. But it's the line that he's most associated with, and the (false) consensus is that he said it in Stagecoach. So if you get asked this in a quiz, answer "Stagecoach".
© Haydn Thompson 2017